#  python3 sqllite3

import sqlite3 as db

conn = db.connect("./data/test1.db")
c = conn.cursor()
sql_createTable_bank="""
create table bank(bank_id	int,
	bank_name	vchar(255),
	bank_num	vchar(30)     primary key,
	is_credit	bool,
	credit_balance	fload,
	balance	fload,
	account_day	int,
	interest_free	int)
"""
sql_createTbale_channel= """
create table channel(channel_id    int     primary key,
    channel_level int,
	channel_name_p	vchar(255),
	channel_name	vchar(255),
	channel_type	int,
	is_self	bool,
	channel_tax	fload,
	bank_num	vchar(30),
	pic	blog
	)
"""
sql_crateTable_accountBook = """
create table accontBook(account_id int primary key,
date date ,
cardNum_out vchar(30) ,
type vchar(255) ,
cardNum_in int ,
amount float ,
booked int ,
booked_date date ,
is_return int 
    )
"""
c.execute(sql_createTable_bank)
c.execute(sql_createTbale_channel)
c.execute(sql_crateTable_accountBook)
c.execute("insert into bank values(1,'工商银行','2333 2334 3445 4335',1,50000,50000,1,25)")
conn.commit()
c.execute("select * from bank")
print(c.fetchone())
c.close()
